Moscow Math Olympiad Question